const Main = () => import('@/views/Main.vue')
export default [
    // 首页
    {
        path:"dashboard",
        name:'',
        component: Main,
        meta: {
            title: "home",
            icon: "icon-shouye"
        },
        children: [
            {
                path: "",
                name: "Dashboard",
                component: () => import("../views/Dashboard.vue"),
                meta: {
                    title: "home",
                    icon: 'icon-shouye'
                }
            }
        ]
    },
    //运营管理
    {
        path: 'operationmanage',
        name: 'OperationManage',
        component: Main,
        meta: {
            title: 'operate.operatemanage',
            icon: 'icon-yunyingtuiguang'
        },
        children: [
            // 订单管理
            {
                path: 'order',
                name: 'OrderManage',
                meta: {
                    title: 'operate.ordermanage'
                },
                component: () => import('@/views/operatemanage/OrderManage.vue')

            },
            // 评论管理
            {
                path: 'comment',
                name: 'CommentManage',
                meta: {
                    title: 'operate.commentmanage'
                },
                component: () => import('@/views/operatemanage/CommentManage.vue')
            },
            // 运费管理
            {
                path: 'freight',
                name: 'FreightManage',
                meta: {
                    title: 'operate.freightmanage'
                },
                component: () => import('@/views/operatemanage/FreightManage.vue')
            }
        ]
    },
    //商品管理
    {
        path: 'goodsmanage',
        name: 'GoodsManage',
        component: Main,
        meta: {
            title: 'goods.goodsmanage',
            icon: 'icon-shangpin'
        },
        children: [
            // 商品列表
            {
                path: 'goodslist',
                name: 'GoodsList',
                meta: {
                    title: 'goods.productlist'
                },
                component: () => import('@/views/goodsmanage/GoodsList.vue')
            },
            //商品添加
            {
                path: 'goodscreate',
                name: 'GoodsCreate',
                meta: {
                    title: 'goods.goodscreate',
                    hide: true,
                    keepAlive: true
                },
                component: () => import('@/views/commodity/GoodsCreate.vue')
            },
            //商品编辑
            {
                path: 'goodsedit/:id',
                name: 'GoodsEdit',
                props: true,
                meta: {
                    title: 'goods.goodsedit',
                    hide: true,
                    keepAlive: true
                },
                component: () => import('@/views/commodity/GoodsEdit.vue')
            },
            //团购商品
            {
                path: 'grouppurchase',
                name: 'GroupPurchase',
                meta: {
                    title: 'goods.grouppurchasegoods'
                },
                component: () => import('@/views/goodsmanage/GroupPurchase.vue')
            },
            //类目管理
            {
                path: 'category',
                name: 'CategoryManage',
                meta: {
                    title: 'goods.categorymanage'
                },
                component: () => import('@/views/goodsmanage/CategoryManage.vue')
            }
        ]
    },
    //推广管理
    {
        path: 'promotionmanage',
        name: 'PromotionManage',
        component: Main,
        meta: {
            title: 'promote.promotemanage',
            icon: 'icon-shangpinfenlei'
        },
        children: [
            //广告管理
            {
                path: 'admanage',
                name: 'AdManage',
                meta: {
                    title: 'promote.admanage'
                },
                component: () => import('@/views/promotionmanage/AdManage.vue')
            },
            //优惠卷管理
            {
                path: 'coupon',
                name: 'CouponManage',
                meta: {
                    title: 'promote.couponmanage'
                },
                component: () => import('@/views/promotionmanage/CouponManage.vue')
            }
        ]
    },
    //用户管理
    {
        path: 'usermanage',
        name: 'UserManage',
        component: Main,
        meta: {
            title: 'user.usermanage',
            icon: 'icon-jurassic_user'
        },
        children: [
            //会员管理
            {
                path: 'member',
                name: 'MemberManage',
                meta: {
                    title: 'user.membermanage'
                },
                component: () => import('@/views/usermanage/MemberManage.vue')
            },
            //地址管理
            {
                path: 'address',
                name: 'AddressManage',
                meta: {
                    title: 'user.addressmanage'
                },
                component: () => import('@/views/usermanage/AddressManage.vue')
            }
        ]
    },
    //系统管理
    {
        path: 'systemmanage',
        name: 'SystemManage',
        component: Main,
        meta: {
            title: 'system.systemanage',
            icon: 'icon-xitong'
        },
        children: [
            //系统配置
            {
                path: 'systemconfiguration',
                name: 'SystemConfiguration',
                meta: {
                    title: 'system.settingmanage'
                },
                component: () => import('@/views/systemmanage/SystemConfiguration.vue')
            },
            //管理员
            {
                path: 'administrators',
                name: 'Administrators',
                meta: {
                    title: 'system.adminusermanage'
                },
                component: () => import('@/views/systemmanage/Administrators.vue')
            },
            //操作日志
            {
                path: 'operationlog',
                name: 'OperatioLog',
                meta: {
                    title: 'system.operationlog'
                },
                component: () => import('@/views/systemmanage/OperatioLog.vue')
            },
            //角色管理
            {
                path: 'rolemanage',
                name: 'RoleManage',
                meta: {
                    title: 'system.rolemanage'
                },
                component: () => import('@/views/systemmanage/RoleManage.vue')
            }
        ]
    },
]